package com.apimarket.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * xuyang
 */
@AllArgsConstructor
@Getter
@NoArgsConstructor
public enum ExceptionEnum {
		
	UNKONW_ERROR(-1,"未知错误"),
	SUCCESS(0,"成功"),
	TOOSMALL(1,"失败"),
	TOOLARGE(2,"未知错误"),

	Publish_NOT_FOUND(666,"发布信息查询失败" ),
	Publish_INSERT_ERROR(666,"发布信息插入失败" ),
	Publish_UPDATE_ERROR(666,"发布信息更新失败" ),
	Publish_DELETE_ERROR(666,"发布信息删除失败" ),

	Apply_NOT_FOUND(666,"没有申请信息" ),
	Apply_INSERT_ERROR(666,"申请信息插入失败" ),
	Apply_UPDATE_ERROR(666,"申请信息更新失败" ),
	Apply_DELETE_ERROR(666,"申请信息删除失败" ),

	Set_NOT_FOUND(400,"接口集数据不存在"),
	Interface_NOT_FOUND(400,"接口数据不存在"),
	Plugin_NOT_FOUND(400,"插件数据不存在"),
	File_NOT_UPLOAD(400,"请上传文件"),
	Type_NOT_FOUND(400,"没有类别数据"),
	Del_SERVICE_HAS_ROUTES(400,"不能删除有绑定路由的接口集"),
	Del_ROUTE_HAS_API(400,"不能删除有绑定API的Route"),
	Dataset_NOT_FOUND(400,"数据块数据不存在"),
	Datapacket_NOT_FOUND(400,"数据包数据不存在"),

	Protocols_IS_EMPTY_ARRY(400,"protocol要么为null，要么传值，不能传空数组"),
	ID_IS_NULL(400,"id不能为空"),
	ID_IS_ERROR(400,"id传值错误"),
	PATH_IS_NULL(400,"paths不能为null"),
	PATH_MUST_START_WITH_XG(400,"paths必须以/开头"),
	Apply_SETID_DATASETID_BOTH_NOT_NULL(400,"申请的接口集id和数据块id不能同时不为null"),
	Apply_REJECT_STATE(400,"只有在审核中的申请才能够驳回"),
	Apply_UPDATE_STATE(400,"只有在审核中的申请才能修改"),
	Apply_SET_ADD_TIMES(400,"接口集申请必须填写每月请求次数"),

	Record_NOT_FOUND(400,"没有这条记录");




	private Integer code;
	private String msg;


}
